﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Bepo.Model.Helpers;
using Bepo.Model.Setup;
using System.Data;
using Framework.Data.SqlServer;
using Framework.Data;

namespace Bepo.Model
{
    public static class Core
    {
        static DatabaseDirect db = null;
        public static DatabaseDirect DatabaseDirect
        {
            get
            { 
                if (db == null) db = Configure.GetDatabase();
                return db;
            }
        }


        public static void Init()
        {
            try
            {
                var setup = new SetupHelper();
                setup.Run();
            }
            catch (Exception x)
            {
                new LogEvent(x).Raise();
            }
        }
    }
}
